package vn.gq.udv.utils;

import java.util.Random;

public class ApiUrl {
	private static String[] urls = new String[] {
		"http://gq-ungdungviet.appspot.com",
		"http://gq-ungdungviet.appspot.com",
		"http://gq-ungdungviet.appspot.com"
	};
	
	public static String getApiUrl() {
		Random rnd = new Random();
		int randomIdx = rnd.nextInt(urls.length);
		return urls[randomIdx];
	}
	
	public static String getPackageUrl(String packageId) {
		String rootUrl = getApiUrl();
		return String.format("%s/package?pid=%s", rootUrl, packageId);
	}
	
}
